package router

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"micro/api/handler"
	"micro/middleware"
)

func Router(c *gin.Engine) {

	user := c.Group("/api/user")
	friend := c.Group("/api/friend")
	message := c.Group("/api/message")
	black := c.Group("/api/black")

	c.POST("/login", handler.Login)
	c.POST("/register", handler.Register)

	c.Group("/api", middleware.JwtPare())
	c.POST("/sms", handler.Sms)

	fmt.Println(user, friend, message, black)

}
